import { createRouter, createWebHistory,Router } from 'vue-router'
import flexible from '@/utils/flexible'
import mobileTerminalRoutes from './modules/mobile-routes'
import pcTerminalRoutes from './modules/pc-routes'

const { isMobileTerminal } = flexible
console.log(isMobileTerminal().value);

console.log('当前router模式',isMobileTerminal().value ? 'mobileTerminalRoutes' : 'pcTerminalRoutes');
const router: Router = createRouter({
  history: createWebHistory(),
  routes: isMobileTerminal().value ? mobileTerminalRoutes : pcTerminalRoutes,
})

export default router